<template name="merchantBuy">
  <div class="list-block" style="margin:2px 0">
    <ul>
      <li>
        <div class="item-content">
          <div class="item-inner">
            <div class="item-title label">总金额：</div>
            <div class="item-input">
              <input type="hidden" id="mname" value="{{merDetail.name}}">
              <input type="hidden" id="merchant_id" value="{{merDetail.id}}">
              <input type="hidden" value="{{merDetail.site_id}}" id="site_id">
              <input type="hidden" value="{{merDetail.list_image.path}}" id="list_image">
              <input type="number" id="total_money" style="color:#ff0000;font-size:1.2rem;" min="0.01" placeholder="询问服务员后输入">
            </div>
          </div>
        </div>
      </li>
      <li>
        <div class="item-content">
          <div class="item-inner">
            <div class="item-title label">不参与优惠金额：</div>
            <div class="item-input">
              <input type="number" id="no_dis_money" style="color:#ff0000;font-size:1.2rem;" min="0" placeholder="询问服务员后输入">
            </div>
          </div>
        </div>
      </li>
      <li>
        <div class="item-content">
          <div class="item-inner">
            <div class="item-title label" style="width:220px !important">
              <span class="s7-m-buy s7-color-re">闲</span>
              {{#if merDetail.idle.discount}}
              当前闲惠折扣<span class="s7-font-w">{{dis merDetail.idle.discount}}</span>折<br>
              <span style="font-size:12px">&nbsp;&nbsp;(最多可优惠{{merDetail.idle.max_discount_amount}}元)</span>
              {{else}}
              当前时间暂无折扣
              {{/if}}
            </div>
            <div class="item-input">
              <!-- {{#if merDetail.idle.discount}} -->
              <label class="label-checkbox item-content" style="float:right">
                <input type="checkbox" name="my-checkbox" id="discount" checked="true" value="{{merDetail.idle.discount}}">
                <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
              </label>
              <!-- {{/if}} -->
            </div>
          </div>
        </div>
      </li>
      <li>
        <div class="item-content" id="open-about">
          <div class="item-inner">
            <div class="item-title label s7-right-row-center" style="width:90% !important">
              <span class="s7-m-buy s7-color-pru">劵</span>
              <span id="coupon_k">选择可用优惠券</span>
            </div>
          </div>
        </div>
      </li>
      <li>
        <div class="item-content">
          <div class="item-inner">
            <div class="item-title label">支付金额(￥)：</div>
            <div class="item-input">
              <input type="number" id="pay_money" readonly="true" style="color:#ff0000;font-size:1.2rem;" placeholder="">
            </div>
          </div>
        </div>
      </li>
    </ul>
    <div style="font-size:0.9rem;color:#4C525A">（注意：闲时优惠折扣和优惠券不可叠加使用）</div>
  </div>
  <div class="content-block">
    <p>
      <a href="#" class="button button-big button-fill pay-go" data-hr='' style="color:#fff !important;font-size: 1.2rem;">提交订单</a>
    </p>
  </div>
  <div id="dispoupop">
    <div class="popup popup-about" style="height:80%;margin-top:35%">
      <div class="content-block" style="margin-top:5px">
        <div class="s7-popup-close"><span class="close-popup">关闭</span></div>
        {{#if coupons}}
        {{#each coupons}}
        <div class="s7-coupon">
          <div class="s7-coupon-left">
            <span style="font-size:1.3rem;color:#ff0000">
              {{coumoney type des}}
            </span><br>
            <span style="font-size:0.8rem">
              {{fulls type full}}
            </span>
          </div>
          <div class="s7-coupon-right">
            <div class="s7-coupon-title">
              {{merDetail.name}}
            </div>
            <div class="s7-coupon-center">
              <div style="float:left">
                {{coutype type}}
              </div>
              <a href="#" class="chose-coupon" data-recid="{{rec_id}}" data-detail="{{detail}}">
                <div class="s7-coupon-use">立即使用</div>
              </a>
            </div>
            <div>有效期至：{{end_time}}</div>
          </div>
        </div>
        {{/each}}
        {{else}}
        暂无可用的优惠券
        {{/if}}
      </div>
    </div>
  </div>
</template>
